/*
 * @Author: 刘壮 1815404355@qq.com
 * @Date: 2025-07-08 14:41:01
 * @LastEditors: 刘壮 1815404355@qq.com
 * @LastEditTime: 2025-07-10 17:22:53
 * @FilePath: \gaosu\gaosu\vite.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src'),
    },
  },
  server: {
    open: true, 
    proxy: {
      '/api': {
        target: 'http://10.1.0.48:9004',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      }
    }
  }
})
